package International;

import java.util.*;
import java.util.ResourceBundle;

public class InternationalizationDemo{
    public static void main(String[] args){
        String language;
        String country;
        Locale locale;
        ResourceBundle message;

        if (args.length != 2){
            language = new String("en");
            country = new String("US");
        }
        else{
            language = new String(args[0]);
            country = new String(args[1]);
        }
         locale = new Locale(language, country);
         
         System.out.println("properties.MessagesBundle"+ locale);
         message = ResourceBundle.getBundle("MessagesBundle", locale);
         System.out.println(message.getString("localeInfo") + "(" + locale.getDisplayLanguage() + "," + locale.getDisplayCountry() + ").\n");
         System.out.println(message.getString("welcome"));
         System.out.println(message.getString("sayThanks"));
    }
}
